// pages/mymsg/mymsg.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    span: 'none',
    isleft: true,
    pageNow: 0,
    isNomore: true,
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
  
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
  
  },

  goleft: function () {
    var that = this;
    that.setData({
      isleft: true,
      pageNow: 0,
    });
  },

  goright:function(){
    var that = this;
    that.setData({
      isleft: false,
      pageNow: 1,
    });
  },

  changeCurrent: function (e) {
    var cur = e.detail.current;
    switch (cur) {
      case 0:
        this.setData({
          isleft: true,
        });
        break;
      case 1:
        this.setData({
          isleft: false,
        });
        break;
    }
  },

  delete:function(){
    var that = this;
    that.setData({
      isNomore: false
    })
  },

  deleteOK:function(){
    var that = this;
    that.setData({
      isNomore: true
    })
  },

  goMsg:function(e){
    var that = this;
    var id = e.currentTarget.id;
    switch (id){
      case '0':
        wx.navigateTo({
          url: '../mydis/mydis',
        })
        break;
      case '1':
        wx.navigateTo({
          url: '../disme/disme',
        })
        break;
      case '2':
        wx.navigateTo({
          url: '../handme/handme',
        })
        break;
    }
  }
})